// Licensed to Elasticsearch B.V under one or more agreements.
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.
//
// ███╗   ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
// ████╗  ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
// ██╔██╗ ██║██║   ██║   ██║   ██║██║     █████╗
// ██║╚██╗██║██║   ██║   ██║   ██║██║     ██╔══╝
// ██║ ╚████║╚██████╔╝   ██║   ██║╚██████╗███████╗
// ╚═╝  ╚═══╝ ╚═════╝    ╚═╝   ╚═╝ ╚═════╝╚══════╝
// ------------------------------------------------
//
// This file is automatically generated.
// Please do not edit these files manually.
//
// ------------------------------------------------

#nullable restore

using Elastic.Clients.Elasticsearch.Serverless.Core;
using Elastic.Clients.Elasticsearch.Serverless.Fluent;
using Elastic.Clients.Elasticsearch.Serverless.Serialization;
using Elastic.Transport;
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq.Expressions;
using System.Text.Json;
using System.Text.Json.Serialization;

namespace Elastic.Clients.Elasticsearch.Serverless.Analysis;

public partial class Analyzers : IsADictionary<string, IAnalyzer>
{
	public Analyzers()
	{
	}

	public Analyzers(IDictionary<string, IAnalyzer> container) : base(container)
	{
	}

	public void Add(string name, IAnalyzer analyzer) => BackingDictionary.Add(Sanitize(name), analyzer);
	public bool TryGetAnalyzer(string name, [NotNullWhen(returnValue: true)] out IAnalyzer analyzer) => BackingDictionary.TryGetValue(Sanitize(name), out analyzer);

	public bool TryGetAnalyzer<T>(string name, [NotNullWhen(returnValue: true)] out T? analyzer) where T : class, IAnalyzer
	{
		if (BackingDictionary.TryGetValue(Sanitize(name), out var matchedValue) && matchedValue is T finalValue)
		{
			analyzer = finalValue;
			return true;
		}

		analyzer = null;
		return false;
	}
}

public sealed partial class AnalyzersDescriptor : IsADictionaryDescriptor<AnalyzersDescriptor, Analyzers, string, IAnalyzer>
{
	public AnalyzersDescriptor() : base(new Analyzers())
	{
	}

	public AnalyzersDescriptor(Analyzers analyzers) : base(analyzers ?? new Analyzers())
	{
	}

	public AnalyzersDescriptor Arabic(string analyzerName) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.ArabicAnalyzerDescriptor, ArabicAnalyzer>(analyzerName, null);
	public AnalyzersDescriptor Arabic(string analyzerName, Action<Elastic.Clients.Elasticsearch.Serverless.Analysis.ArabicAnalyzerDescriptor> configure) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.ArabicAnalyzerDescriptor, ArabicAnalyzer>(analyzerName, configure);
	public AnalyzersDescriptor Arabic(string analyzerName, ArabicAnalyzer arabicAnalyzer) => AssignVariant(analyzerName, arabicAnalyzer);
	public AnalyzersDescriptor Armenian(string analyzerName) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.ArmenianAnalyzerDescriptor, ArmenianAnalyzer>(analyzerName, null);
	public AnalyzersDescriptor Armenian(string analyzerName, Action<Elastic.Clients.Elasticsearch.Serverless.Analysis.ArmenianAnalyzerDescriptor> configure) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.ArmenianAnalyzerDescriptor, ArmenianAnalyzer>(analyzerName, configure);
	public AnalyzersDescriptor Armenian(string analyzerName, ArmenianAnalyzer armenianAnalyzer) => AssignVariant(analyzerName, armenianAnalyzer);
	public AnalyzersDescriptor Basque(string analyzerName) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.BasqueAnalyzerDescriptor, BasqueAnalyzer>(analyzerName, null);
	public AnalyzersDescriptor Basque(string analyzerName, Action<Elastic.Clients.Elasticsearch.Serverless.Analysis.BasqueAnalyzerDescriptor> configure) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.BasqueAnalyzerDescriptor, BasqueAnalyzer>(analyzerName, configure);
	public AnalyzersDescriptor Basque(string analyzerName, BasqueAnalyzer basqueAnalyzer) => AssignVariant(analyzerName, basqueAnalyzer);
	public AnalyzersDescriptor Bengali(string analyzerName) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.BengaliAnalyzerDescriptor, BengaliAnalyzer>(analyzerName, null);
	public AnalyzersDescriptor Bengali(string analyzerName, Action<Elastic.Clients.Elasticsearch.Serverless.Analysis.BengaliAnalyzerDescriptor> configure) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.BengaliAnalyzerDescriptor, BengaliAnalyzer>(analyzerName, configure);
	public AnalyzersDescriptor Bengali(string analyzerName, BengaliAnalyzer bengaliAnalyzer) => AssignVariant(analyzerName, bengaliAnalyzer);
	public AnalyzersDescriptor Brazilian(string analyzerName) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.BrazilianAnalyzerDescriptor, BrazilianAnalyzer>(analyzerName, null);
	public AnalyzersDescriptor Brazilian(string analyzerName, Action<Elastic.Clients.Elasticsearch.Serverless.Analysis.BrazilianAnalyzerDescriptor> configure) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.BrazilianAnalyzerDescriptor, BrazilianAnalyzer>(analyzerName, configure);
	public AnalyzersDescriptor Brazilian(string analyzerName, BrazilianAnalyzer brazilianAnalyzer) => AssignVariant(analyzerName, brazilianAnalyzer);
	public AnalyzersDescriptor Bulgarian(string analyzerName) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.BulgarianAnalyzerDescriptor, BulgarianAnalyzer>(analyzerName, null);
	public AnalyzersDescriptor Bulgarian(string analyzerName, Action<Elastic.Clients.Elasticsearch.Serverless.Analysis.BulgarianAnalyzerDescriptor> configure) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.BulgarianAnalyzerDescriptor, BulgarianAnalyzer>(analyzerName, configure);
	public AnalyzersDescriptor Bulgarian(string analyzerName, BulgarianAnalyzer bulgarianAnalyzer) => AssignVariant(analyzerName, bulgarianAnalyzer);
	public AnalyzersDescriptor Catalan(string analyzerName) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.CatalanAnalyzerDescriptor, CatalanAnalyzer>(analyzerName, null);
	public AnalyzersDescriptor Catalan(string analyzerName, Action<Elastic.Clients.Elasticsearch.Serverless.Analysis.CatalanAnalyzerDescriptor> configure) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.CatalanAnalyzerDescriptor, CatalanAnalyzer>(analyzerName, configure);
	public AnalyzersDescriptor Catalan(string analyzerName, CatalanAnalyzer catalanAnalyzer) => AssignVariant(analyzerName, catalanAnalyzer);
	public AnalyzersDescriptor Chinese(string analyzerName) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.ChineseAnalyzerDescriptor, ChineseAnalyzer>(analyzerName, null);
	public AnalyzersDescriptor Chinese(string analyzerName, Action<Elastic.Clients.Elasticsearch.Serverless.Analysis.ChineseAnalyzerDescriptor> configure) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.ChineseAnalyzerDescriptor, ChineseAnalyzer>(analyzerName, configure);
	public AnalyzersDescriptor Chinese(string analyzerName, ChineseAnalyzer chineseAnalyzer) => AssignVariant(analyzerName, chineseAnalyzer);
	public AnalyzersDescriptor Cjk(string analyzerName) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.CjkAnalyzerDescriptor, CjkAnalyzer>(analyzerName, null);
	public AnalyzersDescriptor Cjk(string analyzerName, Action<Elastic.Clients.Elasticsearch.Serverless.Analysis.CjkAnalyzerDescriptor> configure) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.CjkAnalyzerDescriptor, CjkAnalyzer>(analyzerName, configure);
	public AnalyzersDescriptor Cjk(string analyzerName, CjkAnalyzer cjkAnalyzer) => AssignVariant(analyzerName, cjkAnalyzer);
	public AnalyzersDescriptor Custom(string analyzerName) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.CustomAnalyzerDescriptor, CustomAnalyzer>(analyzerName, null);
	public AnalyzersDescriptor Custom(string analyzerName, Action<Elastic.Clients.Elasticsearch.Serverless.Analysis.CustomAnalyzerDescriptor> configure) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.CustomAnalyzerDescriptor, CustomAnalyzer>(analyzerName, configure);
	public AnalyzersDescriptor Custom(string analyzerName, CustomAnalyzer customAnalyzer) => AssignVariant(analyzerName, customAnalyzer);
	public AnalyzersDescriptor Czech(string analyzerName) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.CzechAnalyzerDescriptor, CzechAnalyzer>(analyzerName, null);
	public AnalyzersDescriptor Czech(string analyzerName, Action<Elastic.Clients.Elasticsearch.Serverless.Analysis.CzechAnalyzerDescriptor> configure) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.CzechAnalyzerDescriptor, CzechAnalyzer>(analyzerName, configure);
	public AnalyzersDescriptor Czech(string analyzerName, CzechAnalyzer czechAnalyzer) => AssignVariant(analyzerName, czechAnalyzer);
	public AnalyzersDescriptor Danish(string analyzerName) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.DanishAnalyzerDescriptor, DanishAnalyzer>(analyzerName, null);
	public AnalyzersDescriptor Danish(string analyzerName, Action<Elastic.Clients.Elasticsearch.Serverless.Analysis.DanishAnalyzerDescriptor> configure) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.DanishAnalyzerDescriptor, DanishAnalyzer>(analyzerName, configure);
	public AnalyzersDescriptor Danish(string analyzerName, DanishAnalyzer danishAnalyzer) => AssignVariant(analyzerName, danishAnalyzer);
	public AnalyzersDescriptor Dutch(string analyzerName) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.DutchAnalyzerDescriptor, DutchAnalyzer>(analyzerName, null);
	public AnalyzersDescriptor Dutch(string analyzerName, Action<Elastic.Clients.Elasticsearch.Serverless.Analysis.DutchAnalyzerDescriptor> configure) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.DutchAnalyzerDescriptor, DutchAnalyzer>(analyzerName, configure);
	public AnalyzersDescriptor Dutch(string analyzerName, DutchAnalyzer dutchAnalyzer) => AssignVariant(analyzerName, dutchAnalyzer);
	public AnalyzersDescriptor English(string analyzerName) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.EnglishAnalyzerDescriptor, EnglishAnalyzer>(analyzerName, null);
	public AnalyzersDescriptor English(string analyzerName, Action<Elastic.Clients.Elasticsearch.Serverless.Analysis.EnglishAnalyzerDescriptor> configure) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.EnglishAnalyzerDescriptor, EnglishAnalyzer>(analyzerName, configure);
	public AnalyzersDescriptor English(string analyzerName, EnglishAnalyzer englishAnalyzer) => AssignVariant(analyzerName, englishAnalyzer);
	public AnalyzersDescriptor Estonian(string analyzerName) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.EstonianAnalyzerDescriptor, EstonianAnalyzer>(analyzerName, null);
	public AnalyzersDescriptor Estonian(string analyzerName, Action<Elastic.Clients.Elasticsearch.Serverless.Analysis.EstonianAnalyzerDescriptor> configure) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.EstonianAnalyzerDescriptor, EstonianAnalyzer>(analyzerName, configure);
	public AnalyzersDescriptor Estonian(string analyzerName, EstonianAnalyzer estonianAnalyzer) => AssignVariant(analyzerName, estonianAnalyzer);
	public AnalyzersDescriptor Fingerprint(string analyzerName) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.FingerprintAnalyzerDescriptor, FingerprintAnalyzer>(analyzerName, null);
	public AnalyzersDescriptor Fingerprint(string analyzerName, Action<Elastic.Clients.Elasticsearch.Serverless.Analysis.FingerprintAnalyzerDescriptor> configure) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.FingerprintAnalyzerDescriptor, FingerprintAnalyzer>(analyzerName, configure);
	public AnalyzersDescriptor Fingerprint(string analyzerName, FingerprintAnalyzer fingerprintAnalyzer) => AssignVariant(analyzerName, fingerprintAnalyzer);
	public AnalyzersDescriptor Finnish(string analyzerName) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.FinnishAnalyzerDescriptor, FinnishAnalyzer>(analyzerName, null);
	public AnalyzersDescriptor Finnish(string analyzerName, Action<Elastic.Clients.Elasticsearch.Serverless.Analysis.FinnishAnalyzerDescriptor> configure) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.FinnishAnalyzerDescriptor, FinnishAnalyzer>(analyzerName, configure);
	public AnalyzersDescriptor Finnish(string analyzerName, FinnishAnalyzer finnishAnalyzer) => AssignVariant(analyzerName, finnishAnalyzer);
	public AnalyzersDescriptor French(string analyzerName) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.FrenchAnalyzerDescriptor, FrenchAnalyzer>(analyzerName, null);
	public AnalyzersDescriptor French(string analyzerName, Action<Elastic.Clients.Elasticsearch.Serverless.Analysis.FrenchAnalyzerDescriptor> configure) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.FrenchAnalyzerDescriptor, FrenchAnalyzer>(analyzerName, configure);
	public AnalyzersDescriptor French(string analyzerName, FrenchAnalyzer frenchAnalyzer) => AssignVariant(analyzerName, frenchAnalyzer);
	public AnalyzersDescriptor Galician(string analyzerName) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.GalicianAnalyzerDescriptor, GalicianAnalyzer>(analyzerName, null);
	public AnalyzersDescriptor Galician(string analyzerName, Action<Elastic.Clients.Elasticsearch.Serverless.Analysis.GalicianAnalyzerDescriptor> configure) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.GalicianAnalyzerDescriptor, GalicianAnalyzer>(analyzerName, configure);
	public AnalyzersDescriptor Galician(string analyzerName, GalicianAnalyzer galicianAnalyzer) => AssignVariant(analyzerName, galicianAnalyzer);
	public AnalyzersDescriptor German(string analyzerName) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.GermanAnalyzerDescriptor, GermanAnalyzer>(analyzerName, null);
	public AnalyzersDescriptor German(string analyzerName, Action<Elastic.Clients.Elasticsearch.Serverless.Analysis.GermanAnalyzerDescriptor> configure) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.GermanAnalyzerDescriptor, GermanAnalyzer>(analyzerName, configure);
	public AnalyzersDescriptor German(string analyzerName, GermanAnalyzer germanAnalyzer) => AssignVariant(analyzerName, germanAnalyzer);
	public AnalyzersDescriptor Greek(string analyzerName) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.GreekAnalyzerDescriptor, GreekAnalyzer>(analyzerName, null);
	public AnalyzersDescriptor Greek(string analyzerName, Action<Elastic.Clients.Elasticsearch.Serverless.Analysis.GreekAnalyzerDescriptor> configure) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.GreekAnalyzerDescriptor, GreekAnalyzer>(analyzerName, configure);
	public AnalyzersDescriptor Greek(string analyzerName, GreekAnalyzer greekAnalyzer) => AssignVariant(analyzerName, greekAnalyzer);
	public AnalyzersDescriptor Hindi(string analyzerName) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.HindiAnalyzerDescriptor, HindiAnalyzer>(analyzerName, null);
	public AnalyzersDescriptor Hindi(string analyzerName, Action<Elastic.Clients.Elasticsearch.Serverless.Analysis.HindiAnalyzerDescriptor> configure) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.HindiAnalyzerDescriptor, HindiAnalyzer>(analyzerName, configure);
	public AnalyzersDescriptor Hindi(string analyzerName, HindiAnalyzer hindiAnalyzer) => AssignVariant(analyzerName, hindiAnalyzer);
	public AnalyzersDescriptor Hungarian(string analyzerName) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.HungarianAnalyzerDescriptor, HungarianAnalyzer>(analyzerName, null);
	public AnalyzersDescriptor Hungarian(string analyzerName, Action<Elastic.Clients.Elasticsearch.Serverless.Analysis.HungarianAnalyzerDescriptor> configure) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.HungarianAnalyzerDescriptor, HungarianAnalyzer>(analyzerName, configure);
	public AnalyzersDescriptor Hungarian(string analyzerName, HungarianAnalyzer hungarianAnalyzer) => AssignVariant(analyzerName, hungarianAnalyzer);
	public AnalyzersDescriptor Icu(string analyzerName) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuAnalyzerDescriptor, IcuAnalyzer>(analyzerName, null);
	public AnalyzersDescriptor Icu(string analyzerName, Action<Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuAnalyzerDescriptor> configure) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuAnalyzerDescriptor, IcuAnalyzer>(analyzerName, configure);
	public AnalyzersDescriptor Icu(string analyzerName, IcuAnalyzer icuAnalyzer) => AssignVariant(analyzerName, icuAnalyzer);
	public AnalyzersDescriptor Indonesian(string analyzerName) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.IndonesianAnalyzerDescriptor, IndonesianAnalyzer>(analyzerName, null);
	public AnalyzersDescriptor Indonesian(string analyzerName, Action<Elastic.Clients.Elasticsearch.Serverless.Analysis.IndonesianAnalyzerDescriptor> configure) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.IndonesianAnalyzerDescriptor, IndonesianAnalyzer>(analyzerName, configure);
	public AnalyzersDescriptor Indonesian(string analyzerName, IndonesianAnalyzer indonesianAnalyzer) => AssignVariant(analyzerName, indonesianAnalyzer);
	public AnalyzersDescriptor Irish(string analyzerName) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.IrishAnalyzerDescriptor, IrishAnalyzer>(analyzerName, null);
	public AnalyzersDescriptor Irish(string analyzerName, Action<Elastic.Clients.Elasticsearch.Serverless.Analysis.IrishAnalyzerDescriptor> configure) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.IrishAnalyzerDescriptor, IrishAnalyzer>(analyzerName, configure);
	public AnalyzersDescriptor Irish(string analyzerName, IrishAnalyzer irishAnalyzer) => AssignVariant(analyzerName, irishAnalyzer);
	public AnalyzersDescriptor Italian(string analyzerName) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.ItalianAnalyzerDescriptor, ItalianAnalyzer>(analyzerName, null);
	public AnalyzersDescriptor Italian(string analyzerName, Action<Elastic.Clients.Elasticsearch.Serverless.Analysis.ItalianAnalyzerDescriptor> configure) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.ItalianAnalyzerDescriptor, ItalianAnalyzer>(analyzerName, configure);
	public AnalyzersDescriptor Italian(string analyzerName, ItalianAnalyzer italianAnalyzer) => AssignVariant(analyzerName, italianAnalyzer);
	public AnalyzersDescriptor Keyword(string analyzerName) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.KeywordAnalyzerDescriptor, KeywordAnalyzer>(analyzerName, null);
	public AnalyzersDescriptor Keyword(string analyzerName, Action<Elastic.Clients.Elasticsearch.Serverless.Analysis.KeywordAnalyzerDescriptor> configure) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.KeywordAnalyzerDescriptor, KeywordAnalyzer>(analyzerName, configure);
	public AnalyzersDescriptor Keyword(string analyzerName, KeywordAnalyzer keywordAnalyzer) => AssignVariant(analyzerName, keywordAnalyzer);
	public AnalyzersDescriptor Kuromoji(string analyzerName) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.KuromojiAnalyzerDescriptor, KuromojiAnalyzer>(analyzerName, null);
	public AnalyzersDescriptor Kuromoji(string analyzerName, Action<Elastic.Clients.Elasticsearch.Serverless.Analysis.KuromojiAnalyzerDescriptor> configure) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.KuromojiAnalyzerDescriptor, KuromojiAnalyzer>(analyzerName, configure);
	public AnalyzersDescriptor Kuromoji(string analyzerName, KuromojiAnalyzer kuromojiAnalyzer) => AssignVariant(analyzerName, kuromojiAnalyzer);
	public AnalyzersDescriptor Language(string analyzerName) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.LanguageAnalyzerDescriptor, LanguageAnalyzer>(analyzerName, null);
	public AnalyzersDescriptor Language(string analyzerName, Action<Elastic.Clients.Elasticsearch.Serverless.Analysis.LanguageAnalyzerDescriptor> configure) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.LanguageAnalyzerDescriptor, LanguageAnalyzer>(analyzerName, configure);
	public AnalyzersDescriptor Language(string analyzerName, LanguageAnalyzer languageAnalyzer) => AssignVariant(analyzerName, languageAnalyzer);
	public AnalyzersDescriptor Latvian(string analyzerName) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.LatvianAnalyzerDescriptor, LatvianAnalyzer>(analyzerName, null);
	public AnalyzersDescriptor Latvian(string analyzerName, Action<Elastic.Clients.Elasticsearch.Serverless.Analysis.LatvianAnalyzerDescriptor> configure) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.LatvianAnalyzerDescriptor, LatvianAnalyzer>(analyzerName, configure);
	public AnalyzersDescriptor Latvian(string analyzerName, LatvianAnalyzer latvianAnalyzer) => AssignVariant(analyzerName, latvianAnalyzer);
	public AnalyzersDescriptor Lithuanian(string analyzerName) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.LithuanianAnalyzerDescriptor, LithuanianAnalyzer>(analyzerName, null);
	public AnalyzersDescriptor Lithuanian(string analyzerName, Action<Elastic.Clients.Elasticsearch.Serverless.Analysis.LithuanianAnalyzerDescriptor> configure) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.LithuanianAnalyzerDescriptor, LithuanianAnalyzer>(analyzerName, configure);
	public AnalyzersDescriptor Lithuanian(string analyzerName, LithuanianAnalyzer lithuanianAnalyzer) => AssignVariant(analyzerName, lithuanianAnalyzer);
	public AnalyzersDescriptor Nori(string analyzerName) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.NoriAnalyzerDescriptor, NoriAnalyzer>(analyzerName, null);
	public AnalyzersDescriptor Nori(string analyzerName, Action<Elastic.Clients.Elasticsearch.Serverless.Analysis.NoriAnalyzerDescriptor> configure) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.NoriAnalyzerDescriptor, NoriAnalyzer>(analyzerName, configure);
	public AnalyzersDescriptor Nori(string analyzerName, NoriAnalyzer noriAnalyzer) => AssignVariant(analyzerName, noriAnalyzer);
	public AnalyzersDescriptor Norwegian(string analyzerName) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.NorwegianAnalyzerDescriptor, NorwegianAnalyzer>(analyzerName, null);
	public AnalyzersDescriptor Norwegian(string analyzerName, Action<Elastic.Clients.Elasticsearch.Serverless.Analysis.NorwegianAnalyzerDescriptor> configure) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.NorwegianAnalyzerDescriptor, NorwegianAnalyzer>(analyzerName, configure);
	public AnalyzersDescriptor Norwegian(string analyzerName, NorwegianAnalyzer norwegianAnalyzer) => AssignVariant(analyzerName, norwegianAnalyzer);
	public AnalyzersDescriptor Pattern(string analyzerName) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.PatternAnalyzerDescriptor, PatternAnalyzer>(analyzerName, null);
	public AnalyzersDescriptor Pattern(string analyzerName, Action<Elastic.Clients.Elasticsearch.Serverless.Analysis.PatternAnalyzerDescriptor> configure) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.PatternAnalyzerDescriptor, PatternAnalyzer>(analyzerName, configure);
	public AnalyzersDescriptor Pattern(string analyzerName, PatternAnalyzer patternAnalyzer) => AssignVariant(analyzerName, patternAnalyzer);
	public AnalyzersDescriptor Persian(string analyzerName) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.PersianAnalyzerDescriptor, PersianAnalyzer>(analyzerName, null);
	public AnalyzersDescriptor Persian(string analyzerName, Action<Elastic.Clients.Elasticsearch.Serverless.Analysis.PersianAnalyzerDescriptor> configure) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.PersianAnalyzerDescriptor, PersianAnalyzer>(analyzerName, configure);
	public AnalyzersDescriptor Persian(string analyzerName, PersianAnalyzer persianAnalyzer) => AssignVariant(analyzerName, persianAnalyzer);
	public AnalyzersDescriptor Portuguese(string analyzerName) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.PortugueseAnalyzerDescriptor, PortugueseAnalyzer>(analyzerName, null);
	public AnalyzersDescriptor Portuguese(string analyzerName, Action<Elastic.Clients.Elasticsearch.Serverless.Analysis.PortugueseAnalyzerDescriptor> configure) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.PortugueseAnalyzerDescriptor, PortugueseAnalyzer>(analyzerName, configure);
	public AnalyzersDescriptor Portuguese(string analyzerName, PortugueseAnalyzer portugueseAnalyzer) => AssignVariant(analyzerName, portugueseAnalyzer);
	public AnalyzersDescriptor Romanian(string analyzerName) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.RomanianAnalyzerDescriptor, RomanianAnalyzer>(analyzerName, null);
	public AnalyzersDescriptor Romanian(string analyzerName, Action<Elastic.Clients.Elasticsearch.Serverless.Analysis.RomanianAnalyzerDescriptor> configure) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.RomanianAnalyzerDescriptor, RomanianAnalyzer>(analyzerName, configure);
	public AnalyzersDescriptor Romanian(string analyzerName, RomanianAnalyzer romanianAnalyzer) => AssignVariant(analyzerName, romanianAnalyzer);
	public AnalyzersDescriptor Russian(string analyzerName) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.RussianAnalyzerDescriptor, RussianAnalyzer>(analyzerName, null);
	public AnalyzersDescriptor Russian(string analyzerName, Action<Elastic.Clients.Elasticsearch.Serverless.Analysis.RussianAnalyzerDescriptor> configure) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.RussianAnalyzerDescriptor, RussianAnalyzer>(analyzerName, configure);
	public AnalyzersDescriptor Russian(string analyzerName, RussianAnalyzer russianAnalyzer) => AssignVariant(analyzerName, russianAnalyzer);
	public AnalyzersDescriptor Serbian(string analyzerName) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.SerbianAnalyzerDescriptor, SerbianAnalyzer>(analyzerName, null);
	public AnalyzersDescriptor Serbian(string analyzerName, Action<Elastic.Clients.Elasticsearch.Serverless.Analysis.SerbianAnalyzerDescriptor> configure) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.SerbianAnalyzerDescriptor, SerbianAnalyzer>(analyzerName, configure);
	public AnalyzersDescriptor Serbian(string analyzerName, SerbianAnalyzer serbianAnalyzer) => AssignVariant(analyzerName, serbianAnalyzer);
	public AnalyzersDescriptor Simple(string analyzerName) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.SimpleAnalyzerDescriptor, SimpleAnalyzer>(analyzerName, null);
	public AnalyzersDescriptor Simple(string analyzerName, Action<Elastic.Clients.Elasticsearch.Serverless.Analysis.SimpleAnalyzerDescriptor> configure) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.SimpleAnalyzerDescriptor, SimpleAnalyzer>(analyzerName, configure);
	public AnalyzersDescriptor Simple(string analyzerName, SimpleAnalyzer simpleAnalyzer) => AssignVariant(analyzerName, simpleAnalyzer);
	public AnalyzersDescriptor Snowball(string analyzerName) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.SnowballAnalyzerDescriptor, SnowballAnalyzer>(analyzerName, null);
	public AnalyzersDescriptor Snowball(string analyzerName, Action<Elastic.Clients.Elasticsearch.Serverless.Analysis.SnowballAnalyzerDescriptor> configure) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.SnowballAnalyzerDescriptor, SnowballAnalyzer>(analyzerName, configure);
	public AnalyzersDescriptor Snowball(string analyzerName, SnowballAnalyzer snowballAnalyzer) => AssignVariant(analyzerName, snowballAnalyzer);
	public AnalyzersDescriptor Sorani(string analyzerName) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.SoraniAnalyzerDescriptor, SoraniAnalyzer>(analyzerName, null);
	public AnalyzersDescriptor Sorani(string analyzerName, Action<Elastic.Clients.Elasticsearch.Serverless.Analysis.SoraniAnalyzerDescriptor> configure) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.SoraniAnalyzerDescriptor, SoraniAnalyzer>(analyzerName, configure);
	public AnalyzersDescriptor Sorani(string analyzerName, SoraniAnalyzer soraniAnalyzer) => AssignVariant(analyzerName, soraniAnalyzer);
	public AnalyzersDescriptor Spanish(string analyzerName) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.SpanishAnalyzerDescriptor, SpanishAnalyzer>(analyzerName, null);
	public AnalyzersDescriptor Spanish(string analyzerName, Action<Elastic.Clients.Elasticsearch.Serverless.Analysis.SpanishAnalyzerDescriptor> configure) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.SpanishAnalyzerDescriptor, SpanishAnalyzer>(analyzerName, configure);
	public AnalyzersDescriptor Spanish(string analyzerName, SpanishAnalyzer spanishAnalyzer) => AssignVariant(analyzerName, spanishAnalyzer);
	public AnalyzersDescriptor Standard(string analyzerName) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.StandardAnalyzerDescriptor, StandardAnalyzer>(analyzerName, null);
	public AnalyzersDescriptor Standard(string analyzerName, Action<Elastic.Clients.Elasticsearch.Serverless.Analysis.StandardAnalyzerDescriptor> configure) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.StandardAnalyzerDescriptor, StandardAnalyzer>(analyzerName, configure);
	public AnalyzersDescriptor Standard(string analyzerName, StandardAnalyzer standardAnalyzer) => AssignVariant(analyzerName, standardAnalyzer);
	public AnalyzersDescriptor Stop(string analyzerName) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.StopAnalyzerDescriptor, StopAnalyzer>(analyzerName, null);
	public AnalyzersDescriptor Stop(string analyzerName, Action<Elastic.Clients.Elasticsearch.Serverless.Analysis.StopAnalyzerDescriptor> configure) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.StopAnalyzerDescriptor, StopAnalyzer>(analyzerName, configure);
	public AnalyzersDescriptor Stop(string analyzerName, StopAnalyzer stopAnalyzer) => AssignVariant(analyzerName, stopAnalyzer);
	public AnalyzersDescriptor Swedish(string analyzerName) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.SwedishAnalyzerDescriptor, SwedishAnalyzer>(analyzerName, null);
	public AnalyzersDescriptor Swedish(string analyzerName, Action<Elastic.Clients.Elasticsearch.Serverless.Analysis.SwedishAnalyzerDescriptor> configure) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.SwedishAnalyzerDescriptor, SwedishAnalyzer>(analyzerName, configure);
	public AnalyzersDescriptor Swedish(string analyzerName, SwedishAnalyzer swedishAnalyzer) => AssignVariant(analyzerName, swedishAnalyzer);
	public AnalyzersDescriptor Thai(string analyzerName) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.ThaiAnalyzerDescriptor, ThaiAnalyzer>(analyzerName, null);
	public AnalyzersDescriptor Thai(string analyzerName, Action<Elastic.Clients.Elasticsearch.Serverless.Analysis.ThaiAnalyzerDescriptor> configure) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.ThaiAnalyzerDescriptor, ThaiAnalyzer>(analyzerName, configure);
	public AnalyzersDescriptor Thai(string analyzerName, ThaiAnalyzer thaiAnalyzer) => AssignVariant(analyzerName, thaiAnalyzer);
	public AnalyzersDescriptor Turkish(string analyzerName) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.TurkishAnalyzerDescriptor, TurkishAnalyzer>(analyzerName, null);
	public AnalyzersDescriptor Turkish(string analyzerName, Action<Elastic.Clients.Elasticsearch.Serverless.Analysis.TurkishAnalyzerDescriptor> configure) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.TurkishAnalyzerDescriptor, TurkishAnalyzer>(analyzerName, configure);
	public AnalyzersDescriptor Turkish(string analyzerName, TurkishAnalyzer turkishAnalyzer) => AssignVariant(analyzerName, turkishAnalyzer);
	public AnalyzersDescriptor Whitespace(string analyzerName) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.WhitespaceAnalyzerDescriptor, WhitespaceAnalyzer>(analyzerName, null);
	public AnalyzersDescriptor Whitespace(string analyzerName, Action<Elastic.Clients.Elasticsearch.Serverless.Analysis.WhitespaceAnalyzerDescriptor> configure) => AssignVariant<Elastic.Clients.Elasticsearch.Serverless.Analysis.WhitespaceAnalyzerDescriptor, WhitespaceAnalyzer>(analyzerName, configure);
	public AnalyzersDescriptor Whitespace(string analyzerName, WhitespaceAnalyzer whitespaceAnalyzer) => AssignVariant(analyzerName, whitespaceAnalyzer);
}

internal sealed partial class AnalyzerInterfaceConverter : JsonConverter<IAnalyzer>
{
	public override IAnalyzer Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
	{
		var copiedReader = reader;
		string? type = null;
		using var jsonDoc = JsonDocument.ParseValue(ref copiedReader);
		if (jsonDoc is not null && jsonDoc.RootElement.TryGetProperty("type", out var readType) && readType.ValueKind == JsonValueKind.String)
		{
			type = readType.ToString();
		}

		switch (type)
		{
			case "arabic":
				return JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.Analysis.ArabicAnalyzer>(ref reader, options);
			case "armenian":
				return JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.Analysis.ArmenianAnalyzer>(ref reader, options);
			case "basque":
				return JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.Analysis.BasqueAnalyzer>(ref reader, options);
			case "bengali":
				return JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.Analysis.BengaliAnalyzer>(ref reader, options);
			case "brazilian":
				return JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.Analysis.BrazilianAnalyzer>(ref reader, options);
			case "bulgarian":
				return JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.Analysis.BulgarianAnalyzer>(ref reader, options);
			case "catalan":
				return JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.Analysis.CatalanAnalyzer>(ref reader, options);
			case "chinese":
				return JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.Analysis.ChineseAnalyzer>(ref reader, options);
			case "cjk":
				return JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.Analysis.CjkAnalyzer>(ref reader, options);
			case "custom":
				return JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.Analysis.CustomAnalyzer>(ref reader, options);
			case "czech":
				return JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.Analysis.CzechAnalyzer>(ref reader, options);
			case "danish":
				return JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.Analysis.DanishAnalyzer>(ref reader, options);
			case "dutch":
				return JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.Analysis.DutchAnalyzer>(ref reader, options);
			case "english":
				return JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.Analysis.EnglishAnalyzer>(ref reader, options);
			case "estonian":
				return JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.Analysis.EstonianAnalyzer>(ref reader, options);
			case "fingerprint":
				return JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.Analysis.FingerprintAnalyzer>(ref reader, options);
			case "finnish":
				return JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.Analysis.FinnishAnalyzer>(ref reader, options);
			case "french":
				return JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.Analysis.FrenchAnalyzer>(ref reader, options);
			case "galician":
				return JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.Analysis.GalicianAnalyzer>(ref reader, options);
			case "german":
				return JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.Analysis.GermanAnalyzer>(ref reader, options);
			case "greek":
				return JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.Analysis.GreekAnalyzer>(ref reader, options);
			case "hindi":
				return JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.Analysis.HindiAnalyzer>(ref reader, options);
			case "hungarian":
				return JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.Analysis.HungarianAnalyzer>(ref reader, options);
			case "icu_analyzer":
				return JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuAnalyzer>(ref reader, options);
			case "indonesian":
				return JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.Analysis.IndonesianAnalyzer>(ref reader, options);
			case "irish":
				return JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.Analysis.IrishAnalyzer>(ref reader, options);
			case "italian":
				return JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.Analysis.ItalianAnalyzer>(ref reader, options);
			case "keyword":
				return JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.Analysis.KeywordAnalyzer>(ref reader, options);
			case "kuromoji":
				return JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.Analysis.KuromojiAnalyzer>(ref reader, options);
			case "language":
				return JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.Analysis.LanguageAnalyzer>(ref reader, options);
			case "latvian":
				return JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.Analysis.LatvianAnalyzer>(ref reader, options);
			case "lithuanian":
				return JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.Analysis.LithuanianAnalyzer>(ref reader, options);
			case "nori":
				return JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.Analysis.NoriAnalyzer>(ref reader, options);
			case "norwegian":
				return JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.Analysis.NorwegianAnalyzer>(ref reader, options);
			case "pattern":
				return JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.Analysis.PatternAnalyzer>(ref reader, options);
			case "persian":
				return JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.Analysis.PersianAnalyzer>(ref reader, options);
			case "portuguese":
				return JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.Analysis.PortugueseAnalyzer>(ref reader, options);
			case "romanian":
				return JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.Analysis.RomanianAnalyzer>(ref reader, options);
			case "russian":
				return JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.Analysis.RussianAnalyzer>(ref reader, options);
			case "serbian":
				return JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.Analysis.SerbianAnalyzer>(ref reader, options);
			case "simple":
				return JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.Analysis.SimpleAnalyzer>(ref reader, options);
			case "snowball":
				return JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.Analysis.SnowballAnalyzer>(ref reader, options);
			case "sorani":
				return JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.Analysis.SoraniAnalyzer>(ref reader, options);
			case "spanish":
				return JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.Analysis.SpanishAnalyzer>(ref reader, options);
			case "standard":
				return JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.Analysis.StandardAnalyzer>(ref reader, options);
			case "stop":
				return JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.Analysis.StopAnalyzer>(ref reader, options);
			case "swedish":
				return JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.Analysis.SwedishAnalyzer>(ref reader, options);
			case "thai":
				return JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.Analysis.ThaiAnalyzer>(ref reader, options);
			case "turkish":
				return JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.Analysis.TurkishAnalyzer>(ref reader, options);
			case "whitespace":
				return JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.Analysis.WhitespaceAnalyzer>(ref reader, options);
			default:
				return JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.Analysis.CustomAnalyzer>(ref reader, options);
		}
	}

	public override void Write(Utf8JsonWriter writer, IAnalyzer value, JsonSerializerOptions options)
	{
		if (value is null)
		{
			writer.WriteNullValue();
			return;
		}

		switch (value.Type)
		{
			case "arabic":
				JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.ArabicAnalyzer), options);
				return;
			case "armenian":
				JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.ArmenianAnalyzer), options);
				return;
			case "basque":
				JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.BasqueAnalyzer), options);
				return;
			case "bengali":
				JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.BengaliAnalyzer), options);
				return;
			case "brazilian":
				JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.BrazilianAnalyzer), options);
				return;
			case "bulgarian":
				JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.BulgarianAnalyzer), options);
				return;
			case "catalan":
				JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.CatalanAnalyzer), options);
				return;
			case "chinese":
				JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.ChineseAnalyzer), options);
				return;
			case "cjk":
				JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.CjkAnalyzer), options);
				return;
			case "custom":
				JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.CustomAnalyzer), options);
				return;
			case "czech":
				JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.CzechAnalyzer), options);
				return;
			case "danish":
				JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.DanishAnalyzer), options);
				return;
			case "dutch":
				JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.DutchAnalyzer), options);
				return;
			case "english":
				JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.EnglishAnalyzer), options);
				return;
			case "estonian":
				JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.EstonianAnalyzer), options);
				return;
			case "fingerprint":
				JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.FingerprintAnalyzer), options);
				return;
			case "finnish":
				JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.FinnishAnalyzer), options);
				return;
			case "french":
				JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.FrenchAnalyzer), options);
				return;
			case "galician":
				JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.GalicianAnalyzer), options);
				return;
			case "german":
				JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.GermanAnalyzer), options);
				return;
			case "greek":
				JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.GreekAnalyzer), options);
				return;
			case "hindi":
				JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.HindiAnalyzer), options);
				return;
			case "hungarian":
				JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.HungarianAnalyzer), options);
				return;
			case "icu_analyzer":
				JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.IcuAnalyzer), options);
				return;
			case "indonesian":
				JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.IndonesianAnalyzer), options);
				return;
			case "irish":
				JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.IrishAnalyzer), options);
				return;
			case "italian":
				JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.ItalianAnalyzer), options);
				return;
			case "keyword":
				JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.KeywordAnalyzer), options);
				return;
			case "kuromoji":
				JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.KuromojiAnalyzer), options);
				return;
			case "language":
				JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.LanguageAnalyzer), options);
				return;
			case "latvian":
				JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.LatvianAnalyzer), options);
				return;
			case "lithuanian":
				JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.LithuanianAnalyzer), options);
				return;
			case "nori":
				JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.NoriAnalyzer), options);
				return;
			case "norwegian":
				JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.NorwegianAnalyzer), options);
				return;
			case "pattern":
				JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.PatternAnalyzer), options);
				return;
			case "persian":
				JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.PersianAnalyzer), options);
				return;
			case "portuguese":
				JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.PortugueseAnalyzer), options);
				return;
			case "romanian":
				JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.RomanianAnalyzer), options);
				return;
			case "russian":
				JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.RussianAnalyzer), options);
				return;
			case "serbian":
				JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.SerbianAnalyzer), options);
				return;
			case "simple":
				JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.SimpleAnalyzer), options);
				return;
			case "snowball":
				JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.SnowballAnalyzer), options);
				return;
			case "sorani":
				JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.SoraniAnalyzer), options);
				return;
			case "spanish":
				JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.SpanishAnalyzer), options);
				return;
			case "standard":
				JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.StandardAnalyzer), options);
				return;
			case "stop":
				JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.StopAnalyzer), options);
				return;
			case "swedish":
				JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.SwedishAnalyzer), options);
				return;
			case "thai":
				JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.ThaiAnalyzer), options);
				return;
			case "turkish":
				JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.TurkishAnalyzer), options);
				return;
			case "whitespace":
				JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Analysis.WhitespaceAnalyzer), options);
				return;
			default:
				var type = value.GetType();
				JsonSerializer.Serialize(writer, value, type, options);
				return;
		}
	}
}

[JsonConverter(typeof(AnalyzerInterfaceConverter))]
public partial interface IAnalyzer
{
	public string? Type { get; }
}